<?php
	//$tribe_id
		$act_db='phome_ecms_actives';
		$p=$_REQUEST['p'];		
		$whArr=array('tribe_id'=>$tribe_id);
		if($is_good){
			$whArr['is_good']='1';
		}

		$nums=DbTouch($act_db,$whArr,"count(*) as total");
		$page=new page_obj($p,array("itemnum"=>10,"border"=>4,"row_count"=>$nums['total']));
		$limit_str=$page->get_limit_str();
		$act_list=DbTouchAll($act_db,$whArr,'*',' order by truetime desc  '.$limit_str);
		$page_list=$page->build_html_link("p");
?>
<style>
	.ipt_box{width:100%;}
	.big-box{height:120px;}
	.current_subject{color:#eee;background:#;}
</style>
<ol id="dh">
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>">部落首页</a></li>
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>&m=subject">部落讨论</a></li>
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>&m=act" class="change">部落活动</a></li>
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>&m=pho">部落相册</a></li>
</ol>
 <span class="clear"></span> 
<div id="Topic">
	<h3>	
		部落活动 
	</h3>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<th scope="col">活动名称</th>
		<th scope="col">发起人</th>
		<th scope="col">活动时间</th>
		<th scope="col">费用</th>
	  </tr>
	  <?php if($act_list){
		  foreach($act_list as $key=>$val){
			  $U=getUserInfo($val['uid']);
		  ?>
	  <tr>
		<td><a href="<?=$public_r[newsurl]?>"><?php echo $val['title']?></a></td>
		<td><a href='<?=$public_r[newsurl]?>e/member/sp/?uid=<?=$U['userid']?>'><?=$U['nickname']?></a></td>
		<td><?=$val['start_time']?>--<?=$val['end_time']?></td>
		<td><?=$val['spend']?></td>
	  </tr>
	 <?php 
		  }	  
		  }else{
			  ?>
	  <tr>
		<td colspan='4'><div class='no-data'>暂时无相关活动！</div></td>
	  </tr>
	 <?php }?>	  
	</table>	
	<div class="page"><?=$page_list?>
	 
	</div>	

	<div>

	
	</div>
</div>